package jianzhiOfferII;
//剑指 Offer II 069. 山峰数组的顶部
public class Num069_peakIndexInMountainArray {
    public int peakIndexInMountainArray(int[] arr) {
        int l = 0 , r = arr.length - 1;
        while (l < r){
            int mid = (r - l) / 2 + l ;
            if (arr[mid - 1] < arr[mid]){
                l = mid;
            }else {
                r = mid - 1;
            }
        }
        return l;


    }
}
